Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Displaying Rendered • View rawDownload


docs/agents/conventions/backend.md 63f836b03d64eac4fa716b2ada23ab565c2b455e (63f836b0) Text, 715 B

Backend conventions

Applies when editing T383838meshchatx/**/*.py.

• Prefer T383838uv run / T383838task for pytest and ruff.
• HTTP handlers: return 400 for T383838ValueError / bad input, 503 for retryable SQLite/Landlock unavailability, 500 only for unexpected failures.
• Multipart parsers must not assume field order.
• SQLite worker connections must set T383838temp_store=MEMORY in T383838DatabaseProvider (Landlock-safe).
• Under Landlock, memory-pressure must not force FILE temp for conversation queries.
• Keep conversation list queries slim: truncate content, derive attachment flags in SQL, avoid shipping full T383838fields blobs.
• Identity restore validates size and empty payloads. Preserve existing identity metadata on re-import.


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────